package com.fund.api.client;

import com.fund.api.entity.BankCard;
import com.fund.api.entity.TradeOrder;
import com.fund.common.pojo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("client-service")
public interface BankCardClient {

    /**
     * 根据id查询银行卡
     * @param id
     * @return
     */
    @GetMapping("/bankCard")
    public Result<BankCard> getBankCardById(@RequestParam Long id);

    @PutMapping("/orders")
    public Result<Boolean> updateBalanceByOrders(@RequestBody List<TradeOrder> tradeOrderList);
}
